<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core" xml:lang="es" lang="es">
<h:head>

</h:head>
<h:body>	
	<ui:composition template="../../plantillas/plantilla.xhtml">		
		<ui:define name="body">
			<h:form id="obraModificarForm">			
				<p:panel header="Modificar Obra" styleClass="cabeceraPaneles">
					<h:panelGrid id="panelObraModificar" columns="1"
						style="margin-bottom:10px; width:100%;">
						<p:dataTable var="obra"
							value="#{obraBean.lazyObras}" paginator="true"
							rows="10"  paginatorPosition="top"
							paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
							rowsPerPageTemplate="5,10,15" selectionMode="single"
							selection="#{obraBean.obraModificar}" id="obraTable">

							<p:column headerText="Nombre" sortBy="#{obra.nombre}"
								filterBy="#{obra.nombre}">
								<h:outputText value="#{obra.nombre}" />
							</p:column>

							<p:column headerText="Cliente"
								sortBy="#{obra.cliente}"
								filterBy="#{obra.cliente}">
								<h:outputText value="#{obra.cliente}" />
							</p:column>

							<p:column headerText="Poblacion" sortBy="#{obra.poblacion}"
								filterBy="#{obra.poblacion}">
								<h:outputText value="#{obra.poblacion}" />
							</p:column> 

							<f:facet name="footer">
								<p:commandButton value="Modificar" ajax="false" action="#{obraBean.modificar}" />
							</f:facet>
						</p:dataTable>
					</h:panelGrid>
				</p:panel>
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>
